﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using WowParserLib.Events.PrefixArgs;
using WowParserLib.Events.SuffixArgs;

namespace WowParserLib.Events
{
    public abstract class SpellEvent: Event
    {
        private SpellEventArgs _spellEventArgs;

        protected SpellEventArgs SpellEventArgs
        {
            get { return _spellEventArgs; }
        }

        public int Damage
        {
            get { return getDamage(); }
        }

        protected abstract int getDamage();

        public override string ToString()
        {
            return base.ToString() + " " + SpellEventArgs.SpellSchool + "(" + SpellEventArgs.SpellName + ")";
        }

        protected override void initialize(params EventArguments[] args)
        {
            foreach (EventArguments arg in args)
            {
                if (arg is SpellEventArgs)
                {
                    _spellEventArgs = arg as SpellEventArgs;
                }
            }
        }
    }
}
